print portal: don't leak window handles
authorMatthias Clasen <mclasen@redhat.com>
Wed, 15 Aug 2018 23:21:15 +0000 (23:21 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 15 Aug 2018 23:21:15 +0000 (23:21 +0000)
Pointed out by Christian Persch.

Closes https://gitlab.gnome.org/GNOME/gtk/issues/1274

gtk/gtkprintoperation-portal.c

index a6683fd212ae4f477694777e4ed6feb0ada39e9c..ded550262b6ef0fb881a9c813718c8b0ea79051f 100644 (file)
@@ -62,6 +62,8 @@ portal_data_free (gpointer data)
 {
   PortalData *portal = data;
 
+  if (portal->parent)
+    gtk_window_unexport_handle (portal->parent);
   g_object_unref (portal->op);
   g_object_unref (portal->proxy);
   if (portal->loop)